//
//  YMLiveStreamInfo.h
//  YMDemo
//
//  Created by admin on 2022/2/25.
//
#import <Foundation/Foundation.h>
#import "YMLiveAudioConfiguration.h"
#import "YMLiveVideoConfiguration.h"



/// 流状态
typedef NS_ENUM (NSUInteger, YMLiveState){
    /// 准备
    YMLiveReady = 0,
    /// 连接中
    YMLivePending = 1,
    /// 已连接
    YMLiveStart = 2,
    /// 已断开
    YMLiveStop = 3,
    /// 连接出错
    YMLiveError = 4,
    ///  正在刷新
    YMLiveRefresh = 5
};

typedef NS_ENUM (NSUInteger, YMLiveSocketErrorCode) {
    YMLiveSocketError_PreView = 201,              ///< 预览失败
    YMLiveSocketError_GetStreamInfo = 202,        ///< 获取流媒体信息失败
    YMLiveSocketError_ConnectSocket = 203,        ///< 连接socket失败
    YMLiveSocketError_Verification = 204,         ///< 验证服务器失败
    YMLiveSocketError_ReConnectTimeOut = 205      ///< 重新连接服务器超时
};

@interface YMLiveStreamInfo : NSObject

@property (nonatomic, copy) NSString *streamId;

#pragma mark -- FLV
@property (nonatomic, copy) NSString *host;
@property (nonatomic, assign) NSInteger port;
#pragma mark -- RTMP
@property (nonatomic, copy) NSString *url;          ///< 上传地址 (RTMP用就好了)
///音频配置
@property (nonatomic, strong) YMLiveAudioConfiguration *audioConfiguration;
///视频配置
@property (nonatomic, strong) YMLiveVideoConfiguration *videoConfiguration;

@end
